import request from '@/utils/request'
export function getTree(data: any) {
  return request({
    url: '/Base_Company/TreeGridListJson',
    method: 'post',
    data,
  })
}

export function getList(data: any) {
  return request({
    url: '/Wms_WareHouse/GetPageData',
    method: 'post',
    data,
  })
}

export function doEdit(data: any) {
  return request({
    url: '/Wms_WareHouse/savewh',
    method: 'post',
    data,
  })
}
export function getWhinfo(data: any) {
  return request({
    url: '/Wms_WareHouse/getwhinfo',
    method: 'post',
    data,
  })
}
export function doDelete(data: any) {
  return request({
    url: '/Wms_WareHouse/delwh',
    method: 'post',
    data,
  })
}

// 仓库管理下载

export function Wms_WareHouseDown(data: any) {
  return request({
    url: '/Wms_WareHouse/DownLoadTemplate',
    method: 'get',
    headers: { 'Content-Type': 'application/json; application/octet-stream' },
    responseType: 'arraybuffer',
  })
}

// 仓库管理导出

export function Wms_WareHouseExport(data: any) {
  return request({
    url: '/Wms_WareHouse/Export',
    method: 'post',
    headers: { 'Content-Type': 'application/json; application/octet-stream' },
    responseType: 'arraybuffer',
    data,
  })
}
